import { AddFormatFunc, arrayRuleType } from "../types";

AddFormatFunc<arrayRuleType>({

	type: "ARRAY",

	handle: (rule, FMC) => {
		if (rule[1].length === 0) {
			return `[]`;
		} else {
			return `[${rule[1].map(info => FMC(info)).join(", ")}]`;
		}
	},

})
